//
//  UIScrollView+Forward.m
//  Digital Seamonsters
//
//  Created by Adam Cue on 2/2/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "UIScrollView+Forward.h"


@implementation UIScrollView (Forward)

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
	if(self.scrollEnabled == NO){
		for(UIView *subview in [self subviews]){
			if([subview class] == [AnnotationView class]){
				[subview touchesBegan:touches withEvent:event];
			}
		}
	}
	else{
		[super touchesBegan:touches withEvent:event];
	}
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
	if(self.scrollEnabled == NO){
		for(UIView *subview in [self subviews]){
			if([subview class] == [AnnotationView class]){
				[subview touchesMoved:touches withEvent:event];
			}
		}
	}
	else{
		[super touchesMoved:touches withEvent:event];
	}
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
	if(self.scrollEnabled == NO){
		for(UIView *subview in [self subviews]){
			if([subview class] == [AnnotationView class]){
				[subview touchesEnded:touches withEvent:event];
			}
		}
	}
	else{
		[super touchesEnded:touches withEvent:event];
	}
}

@end
